package com.crm.service.cluePoolManager;

import com.alibaba.fastjson.JSONObject;
import com.crm.model.entity.cluePoolManager.CluePoolPrivate;
import com.crm.model.entity.sys.UserAccount;
import com.crm.model.qo.cluePoolManager.CluePoolPrivateQO;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @Author yincuimei
 * @Date 2020/12/24 11:15
 */
public interface CluePoolPrivateDbService {

    Boolean insertCluePoolPrivateInfo(CluePoolPrivate cluePoolPrivate);

    List<CluePoolPrivate> selectCluePoolPrivateBySearchInfo(CluePoolPrivateQO cluePoolPrivateInfo, String sort, String sortOrder);

    /**
     * @author wll
     * 判断线索池名称是否重复  添加 or修改
     * cluePoolPrivateId 线索池id
     */
    CluePoolPrivate selectCluePoolPrivateByName(String cluePoolName,String cluePoolPrivateId);

    /**
     * 根据登录人查询其默认池子的主键
     * @param createPeopleId    ---创建人ID
     * @param deleteStatus      ---删除状态(0:正常;1:已删除)
     * @return
     */
    String selectCluePoolPrivateId(String createPeopleId,Short deleteStatus);

    /**
     * @author wll
     *info 查询个人默认池容量 满了不能进行领取
     *return   true个人默认池容量未满    false个人默认池容量已满
     */
    JSONObject selectCluePoolPrivateDefaultCapacity(CluePoolPrivate cluePoolPrivate);


    /**
     * @author wll
     * info 查询个人默认池信息
     */
    CluePoolPrivate selectCluePoolPrivate(UserAccount userAccount);

    /**
     * 通过私有id查询线索池信息
     * @param id
     * @return
     */
    CluePoolPrivate selectCluePoolPrivateById(String id);

    /**
     * @author wll
     * @date 2021/02/01 11:30
     * info 用户模块-我的线索池-修改
     * @param cluePoolPrivateQO
     * @return
     */
    Boolean update(CluePoolPrivateQO cluePoolPrivateQO);

    /**
     * @author wll
     * @date 2021/02/01
     * info 用户模块-我的线索池-删除
     * @param  id 线索池id
     * @return
     */
    Boolean delete(String id,String accountId, Date date);
}
